package com.dapeis.core.utils;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import com.ag.module.common.api.domain.vo.KVObj;


public final class D2BConstants {
	
	/**用户来源-微信*/
	public static final int USER_THIRD_PARTY_LOGIN_WX = 1;
	
	public static class EVENT {
		public final static String NEW_DAY_EVENT = "_NEW_DAY_EVENT_"; //从0点开始扩展该事件
		public final static String INIT_CITY = "_CMD_INIT_CITY";
		
		public static final String CMD_SPIDER_START = "_cmd_spider_start_";
		public static final String CMD_SPIDER_STOP = "_cmd_spider_stop_";
		public static final String CMD_SPIDER_SEND_INFO = "_cmd_spider_list_";
	}
	
	public static final class PayChannel {
		public static final String WX = "WX";
		public static final String ALIPAY = "ALIPAY";
	}
	
	public static final class Flag {
		public static final class DeviceType {
			public static final String IOS = "ios";
			public static final String ANDROID = "android";
			public final static String ALL = "all";
			public final static String IDS = "ids";
		}
		
		public static final class Terminal {
			public static final String PUSH_TERMINAL_APP_USER = "app_user";
			public static final String PUSH_TERMINAL_APP_PARTNER = "app_partner";
		}
	}
	
	
	public static final class ContentType {
		public static final String TEXT_HTML = "text/html;charset=utf-8";
	}
	
	public static final String DEFAULT_PROVINCE = "33";//杭州
	public static final String DEFAULT_AREACODE = "330106";
	
	public static class Loggers {
		public static Logger ORDER = LoggerFactory.getLogger("order");
//		public static Logger WMSLOOP = LoggerFactory.getLogger("wmsLoop");
		public static Logger TASK = LoggerFactory.getLogger("task");
		public static Logger EXCEPTION = LoggerFactory.getLogger("exception");
		public static Logger PAY = LoggerFactory.getLogger("pay");
		public static Logger PAY_REFUND = LoggerFactory.getLogger("pay_refund");
		public static Logger TIMEOUT = LoggerFactory.getLogger("timeout");
//		public static Logger VERIFY_PROJECT = LoggerFactory.getLogger("verify_project");
//		public static Logger BONUS = LoggerFactory.getLogger("bonus");
	}
	
	public final static class UserMoney {
//		public final static KVObj BUY_GOODS_BONUS_ROOT = new KVObj("1", "无限级人缘消费返现");
//		public final static KVObj BUY_GOODS_BONUS_TWO = new KVObj("2", "2级人缘消费返现");
//		public final static KVObj BUY_GOODS_BONUS_ONE = new KVObj("3", "1级人缘消费返现");
//		public final static KVObj REGIST = new KVObj("6", "注册赠送");
//		public final static KVObj FIRST_RECOMMEND_REGIST = new KVObj("7", "首次推荐");
//		public final static KVObj BUY_GOODS_COST = new KVObj("4", "购买商品");
		public final static KVObj TAKE_CASH_COST = new KVObj("5", "提现");
		public final static KVObj PRAISE = new KVObj("8", "集赞收益"); //点赞

	}
	
	public final static class PartnerMoney {
		public final static KVObj SHOPKEER_ORDER_BOUNS = new KVObj("1", "店长订单分红");
		public final static KVObj ARTIFICER_ORDER_BOUNS = new KVObj("2", "技师订单分红");
	}
	
//	
//	public final static class TAG {
//		public final static int  IOS_BOSS = 1;//ios老板端
//		public final static int  IOS_USER = 2;//ios用户端
//		public final static int  ANDROID_BOSS = 4;//android老板端
//		public final static int  ANDROID_USER = 8;//android用户端
//	}
	
	public final static class SupportPlaceOnOrder {
//		public final static int APPOINTMENT = 1 << 0;//可预约（需填写电话）
		public final static int DOOR = 1 << 1;//可上门（选择店、上门时间，电话）
		public final static int STORE = 1 << 2;//可到店（选择店、电话）
//		public final static int NOW = 1 << 3;//可立刻购买（无需填写）
		public final static int DELIVERY = 1 << 4; // 16 发货方式
	}
	
	public final static class Goods {
		public final static int TYPE_COMMON = 1;//1-普通商品
		public final static int TYPE_CUSTOMER = 2;//2-定制商品
		
		/**<pre>
		 * 项目有个属性：
		 * 项目支持的种类：
		 * 1、可预约（需填写电话）
		 * 2、可上门（选择店、上门时间，电话）
		 * 4、可到店（选择店、电话）
		 * 8、可立刻购买（无需填写）
		 * 16、发货方式
		 * 详见 <code>SupportPlaceOnOrder</code>
		 * </pre>
		 */
		public final static int TYPE_PROJECT = 4;//项目
	}
	
	public final static String CUSTOMIZE_KIND = "customizeKind";
	public final static String CUSTOMIZE_XQ = "customizeXq";
	
	public static class ChannelType {
		public static final int SEND_SMS_REGIST_CHANNEL_TYPE = 1;
		public static final int SEND_SMS_REGIST_FOR_INVITATIONCODE_CHANNEL_TYPE = 2;
		public static final int APP_FORGET_PASSWORD = 3;
		public static final int SEND_SMS_CHANGE_CONTACT_CHANNEL_TYPE = 4;
		public static final int SEND_SMS_CHANGE_TAKE_CASH_CHANNEL_TYPE = 5;
		public static final int SEND_SMS_BUY_PROJECT_CHANNEL_TYPE = 6;
		public static final int SEND_SMS_USE_PROJECT_CHANNEL_TYPE = 7;
		public static final int SEND_SMS_CREATE_COUPONS_CHANNEL_TYPE = 8;
		public static final int SEND_SMS_NOTICE_PUSH_CHANNEL_TYPE = 9;
		public static final int SEND_SMS_BUY_DJM_CHANNEL_TYPE = 10;
		public static final int SEND_SMS_USE_DJM_CHANNEL_TYPE = 11;
		public static final int SEND_SMS_BIND_PHONE_CHANNEL_TYPE = 13; // 微信绑定手机号短信验证
		
		//login/partner_login/artificer_add/wx_bind
		public static final int APP_LOGIN = 14;
		public static final int APP_PARTNER_LOGIN = 15;
		public static final int APP_ARTIFICER_ADD = 16;
		public static final int APP_WX_BIND = 17;
		
		public static final int SEND_SMS_WAIBU_KEFU_CHANNEL_TYPE = 127;
	}
	
	public static class Order {
		public static class PayStatus {
			public static final int WAIT_PAY = 0; //待付款
			public static final int PAY = 1; //已经付款
			public static final int WAIT_REFUND = 2; //待退款
			public static final int REFUND = 3; //已经退款
		}
		
		public static class Status { //订单的状态
			public static final int WAIT_PAY = 0; //待付款
			
			public static final int SC_WAIT_SEND_GOODS = 1; //待发货
			public static final int SC_WAIT_RECEIPT = 2; //待收货
			
			public static final int SP_SHOPKEEPER_WAIT_CONFIRM = 11; //店长待确认
			public static final int SP_ARTIFICER_WAIT_CONFIRM = 12; //技师待认领
			public static final int SP_ARTIFICER_WAIT_SERVICE = 13; //技师待服务
			public static final int SP_ARTIFICER_SERVICEING = 14; //技师服务中
			
			public static final int WAIT_COMMENT = 30; //待评价
			
			public static final int FINISHED = 100; //完成
			public static final int COLSED = -1; //关闭
			public static final int CANEL = -2; //取消
			public static final int DELETE = -3; //用户删除
		}
		
		public static class Remark {
			public static final KVObj ORDER_RECEIVE_AUTO_CONFIRM = new KVObj("orderReceiveAutoConfirm", "系统自动确认收货");
			public static final KVObj ORDER_RECEIVE_USER_CONFIRM = new KVObj("orderReceiveUserConfirm", "用户确认收货");
			public static final KVObj ORDER_CLOSE_BY_USER = new KVObj("orderCloseByUser", "用户关闭订单");
			public static final KVObj ORDER_CLOSE_AUTO = new KVObj("orderCloseAuto", "系统自动关闭订单");
			public static final KVObj ORDER_CANCEL_BY_USER = new KVObj("orderCancelByUser", "用户取消订单");
			public static final KVObj ORDER_CANCEL_AUTO = new KVObj("orderCancelAuto", "系统自动取消订单");
			public static final KVObj USER_DRWAW_BACK = new KVObj("userDrwawback", "用户申请退款");

		}
	}
}
